package com.xxyf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxyf.pojo.Usernoto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.dao.DataAccessException;

import java.sql.SQLException;
import java.util.List;

/**
 * @Author 小小怡飞
 * @Date 2022/8/24 3:31
 * @Version JDK 8
 */
@Mapper
public interface UsernotoMapper extends BaseMapper<Usernoto> {
    /**
     * @Author: 小小怡飞
     * @Date: 2022/9/4 10:30
     * @Param 用户uid
     * @Return 返回总数
     */
    Integer count(@Param("uid") Integer uid,@Param("grouo") String grouo);
    /**
     * @Author: 小小怡飞
     * @Date: 2022/9/4 10:30
     * @Param  用户id
     * @Return 返回对应的 用户信息 于分组信息
     */
    List<Usernoto> pageNote(@Param("uid") Integer uid,
            @Param("grouo") String grouo
            ,@Param("start") Integer start,
            @Param("end") Integer end
    );
    int noteput(Usernoto usernoto) throws DataAccessException;

    Usernoto oneNote(Usernoto usernoto) throws DataAccessException ;

    int reg(Usernoto usernoto) throws DataAccessException ;

    int onedelete(@Param("id") Integer id);

    Usernoto idquery(@Param("id") Long id);
}
